package com.heima.api.admin;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.model.wemedia.dtos.WmNewsReviewDto;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "leadnews-wemedia")
public interface IWmNewsClient {
    /**
     * 文章列表
     */
    @PostMapping("news/list_vo")
    PageResponseResult listVo(@RequestBody WmNewsReviewDto reviewDto);
    /**
     * 文章详情
     */
    @GetMapping("news/one_vo/{id}")
    ResponseResult WmNewById(@PathVariable("id") Integer id);

    /***
     * 审核失败
     * @param reviewDto
     * @return
     */
    @PostMapping("news/auth_fail")
    ResponseResult authFail(@RequestBody WmNewsReviewDto reviewDto);

    /***
     * 审核成功
     * @param reviewDto
     * @return
     */
    @PostMapping("news/auth_pass")
    ResponseResult authPass(@RequestBody WmNewsReviewDto reviewDto);


    /**
     * 敏感词列表查询
     * @param sensitiveDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult<List<WmSensitive>> list(@RequestBody WmSensitiveDto sensitiveDto);


    /**
     * 保存
     * @param wmSensitive
     * @return
     */
    @PostMapping("/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive);

    /**
     * 修改
     * @param wmSensitive
     * @return
     */
    @PostMapping("/update")
    public ResponseResult update(WmSensitive wmSensitive);

    /**
     * 删除
     * @param id
     * @return
     */
    @DeleteMapping("/del/{id}")
    public ResponseResult delete(@PathVariable Integer id);


    /**
     * 插入用户id和密码到自媒体端
     * @param apUser
     * @return
     */
    @PostMapping("user/update")
    ResponseResult updateUser(@RequestBody ApUser apUser);

}
